<template>
  <div class="bgc">
    <van-nav-bar title="播放" left-arrow>
      <template #right>
        <van-icon name="search" size="20" />
      </template>
    </van-nav-bar>

    <div class="title">播放列表</div>
    <ul class="nav">
      <li>
        <img src="../assets/img/play-img/kecheng.png" alt="" />
        <p>课程</p>
      </li>
      <li>
        <img src="../assets/img/play-img/tingshu.png" alt="" />
        <p>听书</p>
      </li>
      <li>
        <img src="../assets/img/play-img/lishi.png" alt="" />
        <p>历史</p>
      </li>
    </ul>

    <div class="hrr"></div>

    <div class="title">正在播放</div>

    <div class="bofang">
      <div class="tupian">
        <img src="../assets/img/play-img/tupian.png" alt="" />
      </div>

      <div class="xq">
        <div class="x">
          <p class="xq-bt">听书——孤独 · 回归自然的我</p>
          <img src="../assets/img/play-img/x.png" alt="" />
        </div>
        <div class="more">
          <p>12:22/45:00</p>
          <p class="gd">更多</p>
        </div>
        <div class="progress">
          <van-slider v-model="value" active-color="#cecece">
            <template #button>
              <div class="custom-button"></div>
            </template>
          </van-slider>
        </div>
        <div class="allbtn">
          <img src="../assets/img/play-img/leftto.png" alt="" class="leftto" />
          <img src="../assets/img/play-img/bofang.png" alt="" class="bofang" />
          <img
            src="../assets/img/play-img/rightto.png"
            alt=""
            class="rightto"
          />
        </div>
      </div>
    </div>
    <div class="bfls">
      <p>历史播放列表</p>
      <ul>
        <li>听书——孤独 · 回归自然的我</li>
        <li>听书——为什么学生不喜欢上学</li>
        <li>课程——吴军 · 硅谷来信</li>
        <li>课程——华数 · 数字化转型必修课</li>
        <li>听书——人类简史</li>
      </ul>
      <button>清空历史记录</button>
    </div>
  </div>
</template>

<script>
import { NavBar } from "vant";
import { Icon } from "vant";
import { useRouter } from "vue-router";
import { Slider } from "vant";
import { ref } from "vue";
export default {
  setup() {
    const router = useRouter();
    const onClickLeft = () => {
      router.go(-1);
    };
    const onClickRight = () => console.log("按钮");
    const value = ref(50);
    // const onChange = (value) => console.log(11);

    return {
      value,
      // onChange,
      onClickLeft,
      onClickRight,
    };
  },
  components: {
    VanNavBar: NavBar,
    VanIcon: Icon,
    VanSlider: Slider,
    // VanButton:Button,
  },

  computed: {},

  mounted() {},

  methods: {},
};
</script>

<style lang="less" scoped>
.van-icon {
  color: black;
}
/deep/.van-nav-bar .van-icon {
  color: #000000;
}
.title {
  font-size: 15px;
  padding: 10px;
}
.bgc {
  position: absolute;
  background-color: #fff;
  height: 100%;
  width: 100%;
}
.nav {
  display: flex;
  justify-content: space-around;
  li {
    display: flex;
    width: 50px;
    height: 50px;
    background-color: #4ab8fa;
    border-radius: 5px;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    p {
      font-size: 11px;
      color: white;
    }
  }
}
/deep/.hrr {
  width: 324px;
  height: 1px;
  margin: 10px auto;
  background-color: #e1e1e1;
}
.bofang {
  display: flex;
  align-items: center;
  .x {
    display: flex;
    flex-wrap: wrap;
    width: 98%;
    font-size: 12px;
  }
  .tupian {
    width: 30%;
    position: relative;
    height: 131px;
    img {
      position: absolute;
      top: 10px;
      left: -50px;
    }
  }
  .xq {
    display: flex;
    flex-wrap: wrap;
    width: 70%;
    font-size: 12px;
    flex-direction: column;
    img {
      width: 15px;
      height: 15px;
      margin-left: 30px;
    }
    .more {
      display: flex;
      flex-wrap: wrap;
      color: #646464;
      padding: 10px 0 0 0px;
      width: 98%;
      justify-content: space-between;
    }
    .xq-bt {
      font-size: 16px;
    }
    .progress {
      width: 98%;
      margin-top: 10px;
      .custom-button {
        width: 10px;
        height: 5px;
        color: #fff;
        font-size: 10px;
        line-height: 18px;
        text-align: center;
        background-color: #909090;
        border-radius: 100px;
      }
    }
    .allbtn {
      display: flex;
      width: 98%;
      justify-content: space-around;
      align-items: center;
      padding: 20px 0 0 0;
      .leftto {
        width: 16px;
        height: 16px;
      }
      .rightto {
        width: 16px;
        height: 16px;
      }
      .bofang {
        width: 30px;
        height: 30px;
      }
    }
  }
}
.bfls {
  display: flex;
  flex-direction: column;
  margin-top: 15px;
  margin-left: 10px;
  p {
    font-size: 14px;
    color: #909090;
    padding: 5px;
  }
  ul {
    display: flex;
    flex-direction: column;
    li {
      font-size: 14px;
      padding: 5px;
      color: #909090;
    }
  }
  button {
    outline: none;
    background-color: #ededed;
    border: none;
    border-radius: 10px;
    width: 80px;
    height: 20px;
    font-size: 10px;
    color: #909090;
    margin: 5px;
  }
}
</style>
